import { createRouter, createWebHashHistory } from "vue-router";

const routes = [
  {
    path: "/",
    redirect: "/home",
  },
  {
    path: "/home",
    component: () => import("../pages/HomeView.vue"),
  },
  {
    path: "/about",
    component: () => import("../pages/AboutView.vue"),
  },
];

const router = createRouter({
  // hash路由
  history: createWebHashHistory(),
  routes, // `routes: routes` 的缩写
});

export default router;
